package com.yeraphael.controller;


import com.yeraphael.entity.ReportJobData;
import com.yeraphael.entity.ReportMultiData;
import com.yeraphael.entity.ReportStudentData;
import com.yeraphael.entity.Result;
import com.yeraphael.service.ReportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/report")
public class ReportController {

     @Autowired
     private ReportService reportService;

     @GetMapping("/empGenderData")
     public Result getGerder() {
          List<ReportMultiData> genderData = reportService.getGerder();
          return Result.success(genderData);
     }

     @GetMapping("/empJobData")
     public Result getJobData() {
          ReportJobData empJobData = reportService.getJobData();
          return Result.success(empJobData);
     }

     @GetMapping("/studentDegreeData")
     public Result getDegreeData() {
          List<ReportMultiData> degreeData = reportService.getDegreeData();
          return Result.success(degreeData);
     }

     @GetMapping("/studentCountData")
     public Result getCountData() {
          ReportStudentData empCountData = reportService.getCountData();
          return Result.success(empCountData);
     }

}
